package com.qingzhuge.scheduler.entity;

import com.qingzhuge.entity.BasePkLongEntity;
import com.qingzhuge.scheduler.enums.JobState;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import javax.persistence.*;
import java.time.LocalDateTime;

/**
 * @author : zero.xiao
 * @description :
 * @date :2019-05-17 11:40
 * @modified :
 */
@EqualsAndHashCode(callSuper = true)
@Data
@Entity
@Table(name = "sys_task_run_log")
public class SysTaskRunLog extends BasePkLongEntity {
    private String groupName;
    private LocalDateTime startTime;
    private LocalDateTime endTime;
    @Column(name = "status_")
    private JobState status;
    private String serverHost;
    private String fireInfo;
    private Long scheduledId;
    @Override
    public String toString() {
        return ToStringBuilder.reflectionToString(this, ToStringStyle.JSON_STYLE);
    }
}
